﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Resource -- This is JS!</title>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="../main.css" >
    <script src="../../release/jskit.core.js"></script>
    <script src="../JskitConfig_doc.js"></script>
    <style type="text/css">
         BODY,TD{
         }
        .typeof_table{
            background-color:#cccccc;
            border:1px solid #000000;
        }
        .typeof_table TD{
            padding:5px 5px;
            background-color:#f4f4f4;

        }
        .typeof_table TD.true{
            padding:5px 5px;
            background-color:#f4f4f4;
            color:#ff0000;
            font-weight:bold;
        }
        .typeof_table TD.n{
            padding:5px 5px;
            background-color:#f4f4f4;
            color:#00a000;
            font-weight:bold;
        }
        .typeof_table TH
        {
            width:200px;
            padding:5px 5px;
            text-align:right;
            font-weight:normal;
            background-color:#aaccff;
            color:#000000;

        }    </style>
    <script>
        function TestEquals() {
            var aa = [1, "1", "",8, true, "true", "a", null, undefined, "undefined", window, event];
            var bb = ["1", 1, 0, "8", "true", "_", 96, null, "undefined", "_", "_", "_"];
            var str = new Array();
            str.push('<table class="typeof_table" cellspacing="1" cellpadding="0">');
            for (var i = 0; i < aa.length; i++) {
                a1 = (typeof (aa[i]) == "string") ? '"' + aa[i] + '"' : aa[i];
                a = aa[i]
                b1 = (typeof (bb[i]) == "string") ? '"' + bb[i] + '"' : bb[i];
                b = bb[i]
                str.push('<tr>');
                str.push('<td><b>[' + typeof(a)+"]</b> "+a + '</td>');
                str.push('<td>');
                str.push('<table>');
                str.push('<tr><th>(' + a1 + ')</th><td class="' + (a) + '">= ' + (a) + '</td></tr>');
                str.push('<tr><th>(' + a1 + '==true)</th><td class="'+(a == true)+'">= ' + (a == true) + '</td></tr>');
                str.push('<tr><th>(' + a1 + '===true)</th><td class="' + (a === true) + '">= ' + (a === true) + '</td></tr>');
                if (bb[i] !== "_") {
                    str.push('<tr><th>(' + a1 + '==' + b1 + ')</th><td class="' + (a == b) + '">= ' + (a == b) + '</td></tr>');
                    str.push('<tr><th>(' + a1 + '===' + b1 + ')</th><td class="' + (a ===b) + '">= ' + (a === b) + '</td></tr>');
                }
                str.push('</table>');
                str.push('</td>');
                str.push('</tr>');
            }
            str.push('</table>');
            return str.join('');
        }
        function TestDef() {
            var aa = [1, true, "abc"];
            var str = new Array();
            str.push('<table>');
            for (var i = 0; i < aa.length; i++) {
                a = aa[i];
                str.push('<tr>');
                str.push('<td>' + a + '</td>');
                str.push('<td>(a==true)</td>');
                str.push('<td>' + (a == true) + '</td>');
                str.push('<td>(a===true)</td>');
                str.push('<td>' + (a === true) + '</td>');
                str.push('</tr>');
            }
            str.push('</table>');
            return str.join('');
        }
        function OnPageLoad(sender,e){
            var str = TestEquals();
            $$("#canvas").innerHTML = str;
        }
    </script>
</head>
<body onload="OnPageLoad(this,event)">
<table border="0" id="Table1">
	<tbody>
		<tr>
			<td class="package">
				The is JS!
			</td>
		</tr>
		<tr>
			<td class="title">
				JS中的"=="和"==="
			</td>
		</tr>
		<tr>
			<td class="content">
				<div id="canvas"></div>
			</td>
		</tr>
    </tbody>
</table>
                    
</body>
</html>